package com.xiaoshangkou.hellopra.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoshangkou.hellopra.pojo.Admin;
import com.xiaoshangkou.hellopra.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper extends BaseMapper<Admin> {

    //删除用户所有角色
    void deleteAdminAllRoles(Integer aid);

    //给用户添加角色
    void addAdminRole(@Param("aid") Integer aid, @Param("rid")Integer rid);
    //查询用户详情
    Admin findDesc(Integer aid);

    //根据用户名查询权限
    List<Permission> findAllPermission(String username);

}
